{switch name="field.type"}
    {case value="text"}
        <input class="form-control" type="text" name="{$field.name}" value="{$field.value|htmlspecialchars}" id="{$field.name}" placeholder="请填写{$field.title}">
    {/case}

    {case value="label"}
      <div class="form-control">{$field.value}</div>
    {/case}

    {case value="hidden"}
        <input type="hidden" name="{$field.name}" value="{$field.value}" id="{$field.name}" class="text input-large"/>
    {/case}
    {case value="readonly"}
        <input type="text" name="{$field.name}" value="{$field.value}" id="{$field.name}" class="text input-large form-control" placeholder='' readonly/>
       
    {/case}
    {case value="integer"}
        <input type="number" pattern="[0-9]*"  name="{$field.name}" value="{$field.value}"  id="{$field.name}" class="text input-large form-control"  />
    {/case}

    {case text|password}
        <input type="{$field.type}" name="{$field.name}" value="{$field.value??''}" class="form-control">
    {/case}

    {case textarea}
        <textarea name="{$field.name}" rows="5" class="form-control">{$field.value??''}</textarea>
    {/case}

    {case select}
        <select name="{$field.name}" class="form-control" style="width: auto;">
            {volist name="field.opt" id="option"}
                <option value="{$key}" {if $field.value==$key}selected{/if}>{$option}</option>
            {/volist}
        </select>
    {/case}

    {case radio}
        {volist name="field.opt" id="option"}
            <label for="id_{$field.name}_{$key}">
                <input id="id_{$field.name}_{$key}" name="{$field.name}" value="{$key}" type="radio" {if $field.value==$key}checked{/if}/>
                {$option}
            </label> &nbsp; &nbsp; &nbsp;
        {/volist}
    {/case}
    

    {case checkbox}
        {php}$field['value_array'] = explode(',', $field['value']);{/php}
        {volist name="field.opt" id="option"}
            <label for="id_{$field.name}_{$key}">
            <input type="checkbox" value="{$key}" id="id_{$field.name}_{$key}"
                class="oneplus-checkbox" data-field-name="{$field.name}" {if in_array($key, $field.value_array)}checked{/if} />
                {$option}</label>
        {/volist}
        <input type="hidden" name="{$field.name}" class="oneplus-checkbox-hidden" data-field-name="{$field.name}" value="{$field.value}"/>
    {/case}

    {case editor}<!-- 富文本编辑器 -->
        {:widget('common/Ueditor/editor', array(
           $field['name'],
           $field['name'],
           $field['value'],
           $field['style']['width'],
           $field['style']['height'],
           $field['config']
        ))}
    {/case}
    {case file}<!-- 文件 -->
        {:widget('common/UploadFile/render', array(array(
            'name' =>$field['name'],
            'value' =>$field['value'],
        )))}
    {/case}
    {case multiFile}<!-- 多文件 -->
        {:widget('common/UploadMultiFile/render', array(array(
            'name' =>$field['name'],
            'limit' => 9,
            'value' =>$field['value'],
        )))}
    {/case}
    {case image}<!-- 图片 -->
        {:widget('common/UploadImage/render', array(array(
            'name' =>$field['name'],
            'value' =>$field['value'],
            'width' => 100,
            'height' => 100,
        )))}
    {/case}
    {case multiImage}<!-- 多图片 -->
        {:widget('common/UploadMultiImage/render', array(array(
            'name' =>$field['name'],
            'value' =>$field['value'],
            'width' => 100,
            'height' => 100,
        )))}
    {/case}

 {/switch}


